- /* sdcmpi2.cpp by K.Tsuru */
- // function ID 3511 DRADIX, constant
- /********************************
- SDouble class
- pi/2
- Used in Asin(), etc.
- *********************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- static SDouble* mpi2 = NULL; //keep in the static memory
- static uint mpi2_size = 0;
-
- void MPi2Free(){ //free the memory of mpi2
- if(mpi2_size == 0) return;
- delete mpi2; mpi2 = NULL; mpi2_size = 0;
- }
-
- /* pi/2 */
- SDouble MPi2(){
- uint ms = SNManager::SNMaxSize(SNManager::REAL);
- if(mpi2_size < ms){
- if(mpi2 == NULL) mpi2 = new SDouble;
-
- SDouble pi = Pi();
- *mpi2 = DsDiv(pi, 2uL); // pi/2
- mpi2_size = ms;
- }
- return *mpi2;
- }
sdcmpi2.cpp : last modifiled at 2017/06/23 10:17:11(682 bytes)
created at 2017/10/07 10:21:15
The creation time of this html file is 2017/10/07 10:30:03 (Sat Oct 07 10:30:03 2017).